package com.sunbim.rsrv.service;

import com.sunbim.rsrv.pojo.Storage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sunbim.rsrv.vo.storage.StorageVo;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author yuhui
 * @since 2021-12-30
 */
public interface StorageService extends IService<Storage> {

    StorageVo upload(Integer parentId, Integer userId, Integer relicsId, String type, String desc, MultipartFile file);

    StorageVo update(Integer id, Integer userId, Integer relicsId, String type, String desc, MultipartFile file);

    String delete(int id);

    void deleteAllByUserId(int userId);

    void deleteAllByRelicsId(int relicsId);

    List<StorageVo> getListByRelicsIdAndType(int relicsId, String type);

    boolean idExit(Integer id);

    List<Map<String, Object>> getReports(Integer relicsId);

    void deleteBatch(List<Integer> ids);

    void uploadReport(Integer relicsId, MultipartFile report);

    StorageVo getEva();
}
